﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MySql.Data.MySqlClient;

namespace QLXMDataAccessLayer.Logic
{
    public class DataType
    {
        public const String STRING = "String";
        public const String DATE = "Date";
        public const String INT = "Int";
        public const String DOUBLE = "Double";

        
        public MySqlDbType GetDataType(string strTableName, string strColumnName)
        {
            strTableName = strTableName.ToUpper();
            switch (strTableName)
            {
                case "USER":
                    switch (strColumnName)
                    {
                        case "user_name":
                            return MySqlDbType.String;
                        case "full_name":
                            return MySqlDbType.String;                       
                        default:
                            return MySqlDbType.String;
                    }                
                default:
                    return MySqlDbType.String;
            }
        }
    }
}
